package com.example.rotateimageview.customTabView

import android.graphics.*
import android.graphics.drawable.Drawable

class CusDrawable : Drawable() {
    private var paint = Paint()
    private val boundToDraw = RectF()

    override fun draw(canvas: Canvas) {
        boundToDraw.set(bounds)
        canvas.drawRoundRect(boundToDraw, 6f, 6f, paint)
    }

    override fun setAlpha(alpha: Int) {

    }

    override fun setColorFilter(colorFilter: ColorFilter?) {
        paint.colorFilter = colorFilter
    }

    override fun getOpacity(): Int {
      return PixelFormat.TRANSLUCENT
    }
}